<!DOCTYPE html>

<head>
    <meta charset="UTF-8">
    <title></title>
    <style>
        div {
            display: inline-block;
            color: red;
            font-weight: bold;
            cursor: pointer;
            background-color: white;
            text-align: center;
            font-size: 5px;
            width: 80px;
            height: 150px;
        }
    </style>
    <script src="../jQuery-3.6.3.min.js"> </script>
    <script>
        $(function () {
            $("#a1").click(function () {
                alert("为div元素添加了一个点击事件");
            }).click();
        })
    </script>
</head>

<body>

    <div>九天惊落，星海回流</div>
<input type="button" id="a1" value="点击按钮">
</body>

</html>